<!--头部/侧栏-->
<include file="Common/works/header" />
<include file="Common/works/left_menu" />
<!--脚本-->
<script src="__PUBLIC__/js/jquery.selectlist.js"></script>
<script src="__PUBLIC__/home/js/extendSelectList.js"></script>
<!--内容-->
<div class="right">	
	<div class="title">API监控</div>
	
	<div class="monitor_list">
		<div class="monitor_bt">
			<div class="kt">
				<div class="wz">选择服务</div>
				<div class="select">
					<div>
						<select class="_service_change" id="serviceone">
							<option value="-1">全部</option>
							<foreach name="parent_service" item="service" key="keys">
								<option value="{$keys}">{$service}</option>
							</foreach>
						</select>
					</div>
				</div>
			</div>

			<div class="kt">
				<div class="wz">选择api</div>
				<div class="select">
					<div class="_service_change_val">
						<select class="_service_api_option" data-options='{$children_service}' id="servicetwo">
							<option value="0">全部</option>
							<div id="api_options"></div>
						</select>
					</div>
				</div>
				<script id="script_service_api" type="text/html">
					{{each list as value key}}
					<option value="{{key}}">{{value}}</option>
					{{/each}}
				</script>
			</div>

			<div class="kt">
				<div class="wz">选择时间周期</div>
				<div class="select">
					<div>
						<select class="_cycle_type" id="servicethree">
							<option value="2">今天内</option>
							<option value="0">5分钟内</option>
							<option value="1">60分钟内</option>
							<option value="5">7天内</option>
							<option value="3">30天内</option>
							<option value="4">90天内</option>
						</select>
					</div>
				</div>
			</div>

			<a href="javascript:void(0);" title="查询" class="monitor _monitor_search" id="grant">查询</a>

			<div class="cls"></div>
		</div>
		<div class="table-top">
			<div class="tabr">服务名称</div>
			<div class="tab">API名称</div>
			<div class="tab">返回条数</div>
			<div class="tab">请求次数</div>
			<div class="tab">使用人数</div>
			<div class="tab">可用率</div>
			<div class="tab">操作</div>
		</div>
		<!-- 循环go -->

		<div id="monitor_list_content"></div>
		<script id="monitor_list" type="text/html">
			{{if list.length > 0 }} {{each list as value key}}
			<div class="table-foot qs">
				<div class="tabr text-left">{{value.service_name}}</div>
				<div class="tab text-left">{{value.api_name}}</div>
				<div class="tab">{{value.cnt_ret}}</div>
				<div class="tab">{{value.cnt_call}}</div>
				<div class="tab">{{value.count}}</div>
				<div class="tab">{{value.cnt}}</div>
				<div class="tab">
					<a href="/apiworks/monitorDetail.html?api_name={{value.method}}&service_name={{value.service}}&cycle_type={{value.cycle_type}}" title="详情">详情</a>
				</div>
			</div>
			{{/each}} {{else}}
			<div class="wudy"></div>
			{{/if}}
		</script>

		<!-- 循环end -->
	</div>

	<div class="cls"></div>
	<div class="page fr _page_info" style="margin:20px"></div>
</div>
<input type="hidden" class="_all_services" value='{$all_service_name_en}' />
<input type="hidden" class="_all_array_service" value='<?php echo json_encode($parent_service);?>' />
<input type="hidden" class="_all_array_apis" value='{$children_service}' />
</div>
<!--脚本-->
<script type="text/javascript" src="__PUBLIC__/js/common.js"></script>
<script type="text/javascript" src="__PUBLIC__/home/js/artTemplate.js"></script>
<script src="__PUBLIC__/home/js/monitorlist.js"></script>
</body>
</html>